<template>
  <ul class="law-list">
    <li v-for="(item,index) in list" :key="'key-law-list-'+index" v-if="item.parent_title">
      <div class="title" v-if="!noTitle" @click="getList(item.parent_id)">
        <strong>{{item.parent_title}}</strong>
      </div>
      <div class="detail" v-html="item.content"></div>
    </li>
  </ul>
</template>

<script>
export default {
  props: ['list', 'noTitle'],
  methods: {
    getList(parent_id) {
      this.$emit('getList', parent_id)
    }
  }
}
</script>


<style lang="scss" scoped>
.law-list {
  padding: 30px 0;
  list-style: none;
  li {
    background: #fff;
    font-size: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    .title {
      background: rgba(0, 0, 0, 0.05);
      padding: 20px 30px;
      border-bottom: 1px solid #ccc;
      strong {
        border-left: 8px solid #3d69bd;
        font-size: 18px;
        padding-left: 10px;
        color: #3d69bd;
        cursor: pointer;
      }
    }
    .detail {
      padding: 30px;
      font-size: 24px;
      line-height: 1.8;
    }
    .tags {
      // border-top: 1px solid #ddd;
      padding: 0 30px 35px;
      font-size: 16px;
      strong {
        font-size: 18px;
        color: #808080;
      }
      a {
        padding: 7px;
        color: #fff;
        background: #3d69bd;
        border-radius: 4px;
        margin-right: 10px;
        display: inline-block;
      }
    }
  }
}
</style>
